<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网站音乐插件演示Demo</title>
    <link rel="stylesheet" href="./kMusicPlugin.min.css">
    <style>
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: linear-gradient(120deg, #6e8efb 0%, #a777e3 100%);
  background-size: 200% 200%;
  animation: bg-move 8s ease-in-out infinite;
  transition: background 0.5s;
  position: relative;
  overflow-x: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
@keyframes bg-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.music-displayer {
  position: relative;
  margin: 60px auto 30px auto;
  max-width: 420px;
  padding: 28px 24px 18px 24px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(80,60,120,0.18);
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s;
  border: 1.5px solid rgba(255,255,255,0.22);
}
.music-displayer p {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(80,60,120,0.10);
}

.music-za {
  max-width: 520px;
  margin: 0 auto 40px auto;
  background: rgba(255,255,255,0.13);
  border-radius: 14px;
  padding: 28px 28px 18px 28px;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 18px rgba(80,60,120,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
}
.music-za h3 {
  margin-top: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
}
.music-za ol {
  padding-left: 22px;
  margin-bottom: 0;
}
.music-za li {
  margin-bottom: 13px;
  line-height: 1.7;
}
.music-za pre {
  background: rgba(30,30,60,0.18);
  color: #f8f8f2;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 15px;
  overflow-x: auto;
  margin: 8px 0;
  box-shadow: 0 2px 8px rgba(80,60,120,0.06);
}
.music-za code {
  background: none;
  color: #ffe082;
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  font-size: 15px;
  padding: 0;
}
.music-za strong {
  color: #ffd54f;
  font-weight: 600;
}
.music-za p {
  color: #ffe082;
  font-size: 14px;
  margin-top: 18px;
  margin-bottom: 0;
  letter-spacing: 0.5px;
}
@media (max-width: 600px) {
  .music-displayer, .music-za {
    max-width: 98vw;
    padding: 14px 4vw;
  }
  .music-za pre {
    font-size: 13px;
    padding: 8px 6px;
  }
}
.music-fixed-btn-group {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
}

.glow-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  letter-spacing: 0.5px;
  margin-bottom: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.glow-btn:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
  background: #f8f8f8;
}

.gitee { 
  color: #c72e2e;
  border-color: #e6b8b8;
  background: #fff5f5;
}

.gitee:hover { 
  background: #fff0f0;
  border-color: #e0a0a0;
}

.github { 
  color: #333;
  border-color: #ccc;
  background: #fff;
}

.github:hover { 
  background: #f8f8f8;
  border-color: #bbb;
}

.blog { 
  color: #2c7;
  border-color: #a8dba8;
  background: #f0fff0;
}

.blog:hover { 
  background: #e8ffe8;
  border-color: #8fd88f;
}

@media (max-width: 700px) {
  .music-fixed-btn-group {
    top: 10px;
    right: 6px;
    gap: 10px;
  }
  .glow-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}
</style>
</head>
<body>
    <div class="music-displayer">
        <p>网站音乐插件演示Demo</p>
    </div>
    <div class="music-za">
        <h3>如何部署 KMusicPlugin 插件？</h3>
        <ol>
          <li>
                <strong>下载插件文件：</strong><br>
                <p>你可以从 <a href="https://gitee.com/yemao_xiao/MusicPlugin" target="_blank">Gitee</a> 或 <a href="https://github.com/yemao-xiao/MusicPlugin" target="_blank">GitHub</a> 下载插件文件。</p>
               
            </li>
            <li>
                <strong>引入插件文件：</strong><br>
                在你的页面 <code>&lt;head&gt;</code> 或 <code>&lt;body&gt;</code> 末尾添加：
                <pre><code>&lt;link rel="stylesheet" href="kMusicPlugin.min.css"&gt;
&lt;script src="kMusicPlugin.1.0.0.js"&gt;&lt;/script&gt;
</code></pre>
            </li>
            <li>
                <strong>准备歌曲数据：</strong><br>
                在你的 JS 里定义歌曲列表，例如：
                <pre><code>const songs = [
  {
    title: "歌曲名",
    artist: "歌手",
    cover: "封面图片URL",
    src: "音频文件URL",
    lyrics: "歌词文件URL"
  }
  // ...更多歌曲
];</code></pre>
            </li>
            <li>
                <strong>初始化插件：</strong><br>
                在页面加载后调用：
                <pre><code>new MusicPlugin({
  showLyricOnInit: true, // 是否在页面加载时显示歌词
  songs: songs, // 歌曲数组
  autoCollapseTime: 3000, // 自动折叠时间（毫秒）
  autoplay: false // 是否自动播放第一首歌曲
});</code></pre>
            </li>
            <li>
                <strong>完成！</strong> 刷新页面即可看到音乐播放器效果。
            </li>
        </ol>
        <p style="font-size:14px;color:#eee;">注意：确保 <code>js文件</code> 和 <code>css文件</code> 路径正确，音频/歌词文件已上传。</p>
    </div>
     <div class="music-fixed-btn-group">
        <a href="https://gitee.com/你的项目" target="_blank" class="glow-btn gitee">Gitee</a>
        <a href="https://github.com/你的项目" target="_blank" class="glow-btn github">GitHub</a>
        <a href="https://你的博客地址" target="_blank" class="glow-btn blog">我的博客</a>
    </div>
</body>
<script src="./kMusicPlugin.1.0.0.js"></script>
<script>
   
// 在页面 ready 后调用
const songs = [
  {
    title: "那些花儿（翻唱）",
    artist: "鹿乃",
    cover: "http://kkblog/static/img/tx.jpg",
    src: "/static/music/博客歌单/鹿乃-中文翻唱《那些花儿》不插电版.aac",
    lyrics: "/static/music/博客歌单/鹿乃-中文翻唱《那些花儿》不插电版.lrc"
  },
  {
    title: "飞鸟和蝉（翻唱）",
    artist: "鹿乃",
    cover: "",
    src: "/static/music/博客歌单/鹿乃-《飞鸟和蝉》翻唱【鹿乃】.aac",
    lyrics: "/static/music/博客歌单/鹿乃-《飞鸟和蝉》翻唱【鹿乃】.lrc"
  }
  // ...更多歌曲
];
new MusicPlugin({
  showLyricOnInit: true,
  songs: songs,
  autoCollapseTime: 3000,
  autoplay: false
});
</script>
</html>